package com.srcptit.trainning.tranquangvinh.b1;

public class Bai6SoThuanNghich {
	public static boolean ThuanNghich(long n) {
		long tmp=n,s=0;
		while(tmp>0){
			s=s*10+tmp%10;
			tmp=tmp/10;
		}
		if(s==n) return true;
		return false;
	}
	public static  void main(String[] args) {
		System.out.println("Cac so thuan ngich co 6 chu so la:");
		for(long i=100000; i<=999999; i++){
			if(ThuanNghich(i))
				System.out.println(i+"");
		}
	}
}
